<?php
class Silk_Dao_Role extends FP_Dao_Role
{

    public function setTableDefinition()
    {
	parent::setTableDefinition();
        $this->setTableName('silk_role');
    }

    public function setUp()
    {
	$this->hasOne('Silk_Dao_Role as Parent', array('local' => 'parent_id', 'foreign' => 'role_id'));
	$this->hasOne('Silk_Dao_Role as Children', array('local' => 'role_id', 'foreign' => 'parent_id'));
        $this->hasMany('Silk_Dao_User as Users', array('local' => 'role_id', 'foreign' => 'role_id'));
        $this->hasMany('Silk_Dao_Permission as Permissions', array('refClass' => 'Silk_Dao_RolePermission', 'local' => 'role_id', 'foreign' => 'permission_id'));
    }


}

 ?>